'use strict';

/**
 * 通用字典库
 */

// 记录分页的最大显示数
exports.RECORD_MAX = 300;

// 性别
exports.USER_SEX_MALE = 1; //男
exports.USER_SEX_FEMALE = 0; //女

// 用户类型
exports.USER_TYPE_STAFF = 0; //员工
exports.USER_TYPE_TRAINEE = 1; //实习生
exports.USER_TYPE_GUEST = 2; //劳务、出差
exports.USER_TYPE_VIP = 3; //贵宾
exports.USER_TYPE_STRANGER = 4; //陌生人
exports.USER_TYPE_STUDENT = 5; //学生

// 用户类型（WEB对应）
exports.WEB_USER_TYPE_STAFF = 'staff'; //员工(正式员工、实习生)
exports.WEB_USER_TYPE_GUEST = 'guest'; //劳务、出差
exports.WEB_USER_TYPE_VIP = 'vip';
exports.WEB_USER_TYPE_STRANGER = 'stranger';
exports.WEB_USER_TYPE_STUDENT = 'student'; // 学生

// 用户类型（APP对应）
exports.APP_USER_TYPE_STAFF = 'staff'; //员工(正式员工、实习生)
exports.APP_USER_TYPE_GUEST = 'biz'; //劳务、出差
exports.APP_USER_TYPE_VIP = 'vip'; //贵宾

// 访客认定状态
exports.USER_STATUS_OK = 1; //通过
exports.USER_STATUS_PENDING = 0; //待确认
exports.USER_STATUS_DELETE = 2; //已删除（离职等逻辑删除）

// 门禁权限
exports.USER_ACCESS_PERMIT_OK = 1; //开
exports.USER_ACCESS_PERMIT_NO = 0; //不开

// 配置类型

exports.CONFIG_TYPE_DEPT = 0; //部门
exports.CONFIG_TYPE_USER_TYPE = 1; //用户类型
exports.CONFIG_TYPE_ATTENDANCE = 2; //考勤设置
exports.CONFIG_TYPE_SETTING = 3; //系统设置
exports.CONFIG_TYPE_LOGO = 4; //logo设置
exports.CONFIG_TYPE_USERS_SHOW = 5; //用户类型展示配置
exports.CONFIG_TYPE_LIVENESS = 6; //活体检测开关配置
exports.CONFIG_TYPE_STRANGER_SWITCH = 7; //陌生人自动入库开关配置

exports.CONFIG_TYPE_START = exports.CONFIG_TYPE_DEPT;
exports.CONFIG_TYPE_STOP = exports.CONFIG_TYPE_STRANGER_SWITCH;

// 部门增删改
exports.CONFIG_DEPT_ACTION_ADD = '1';
exports.CONFIG_DEPT_ACTION_DEL = '2';
exports.CONFIG_DEPT_ACTION_MOD = '3';

// 记录类型
exports.RECORD_TYPE_REGISTER = 'register'; //注册用户
exports.RECORD_TYPE_STRANGER = 'stranger'; //陌生人

// 考勤状况类型 0 正常 1 早退 2 迟到 3 缺勤 4 既迟到，又早退 5 异常
exports.AD_TYPE_NORMAL = 0; //正常
exports.AD_TYPE_EARLY = 1; //早退
exports.AD_TYPE_LATE = 2; //迟到
exports.AD_TYPE_ABSENTEEISM = 3; //缺勤
exports.AD_TYPE_BAD = 4; //既迟到，又早退
exports.AD_TYPE_ABNORMAL = 5; //异常

// 考勤上下午间隔点
exports.ATTENDANCE_DISTINGUISH_TIME = '13';

// 考勤时刻显示
exports.AD_TIME_STATUS_ON = 1; //显示
exports.AD_TIME_STATUS_OFF = 0; //不显示

// 默认门禁时间
exports.GUARG_TIME_FROM = '0730';
exports.GUARG_TIME_TO = '2230';

// 默认考勤时间
exports.WORK_ON_TIME = '0900';
exports.WORK_OFF_TIME = '1700';

// 用户角色
exports.ROLE_ADMIN = 1; //管理员
exports.ROLE_HR = 2; //人事
exports.ROLE_OPERATION = 3; //运营

// 特征批量上传状态
exports.DOWNLOAD_INFO_UNZIPPING = 0; // 解压中
exports.DOWNLOAD_INFO_UPLOADING = 1; // 上传中
exports.DOWNLOAD_INFO_COMPLETED = 2; // 处理完成
exports.DOWNLOAD_INFO_DOWNLOADED = 3; //记录已经下载
exports.DOWNLOAD_INFO_ERROR = 4; //上传出错
exports.DOWNLOAD_INFO_UNZIPERROR = 5;//解压出错

// 记录类型
exports.FEATURE_TYPE_REGISTER = 'register'; //注册用户
exports.FEATURE_TYPE_STRANGER = 'stranger'; //陌生人

// 文件类型
exports.ZIPFILE_TYPE_AVATAR = 'avatar'; //头像
exports.ZIPFILE_TYPE_FEATURE = 'feature'; //特征

// IPC类型
exports.IPC_TYPE_X1S = 'HobotSmart_X1S'; //X1_3519
exports.IPC_TYPE_RTSP = 'RTSP_Video'; //RTSP
exports.IPC_TYPE_DAHUA = 'DahuaNormal'; //大华 1.0.7版本不再使用SDK，背后也是RTSP流
exports.IPC_TYPE_X1 = 'HobotSmart_X1'; //X1
exports.IPC_TYPE_3519 = 'JulongSmart_3519'; //3519
exports.IPC_TYPE_jHD23 = "Julong_jHD23"; //jHD23


// IPC是否作为门禁
exports.IPC_GUARD_STATUS_ON = 1; //是
exports.IPC_GUARD_STATUS_OFF = 0; //否

// 门禁控制器类型
exports.SW_TYPE_HUAQIANG = 0; //华强货
exports.SW_TYPE_BOXINI = 1;

// 大华摄像头channel
exports.IPC_DH_CHANNEL_1 = 1; //目前玩得最多的channel

// IPC状态
exports.IPC_STATUS_OK = 0; //正常
exports.IPC_STATUS_ERR = 1; //异常

// IPC抓拍状态区分
exports.IPC_ACTION_AUTOSTART = 'AutoStart';
exports.IPC_ACTION_STOP = 'Stop';

// 用户定制配置类型
exports.CUSTOM_VIEW_TYPE_STATIC = 0;
exports.CUSTOM_VIEW_TYPE_DYNAMIC = 1;

// redis push 服务的 channel
exports.REDIS_PUSH_FACE_CONFIG_HEAD = "FACE_";
exports.REDIS_PUSH_CUSTOM_SETTING = "COSTUM_SETTING";

// custom 设置的类型
exports.CUSTOM_LOGO_SETTING = "logo";
exports.CUSTOM_USER_SHOW_SETTING = "userShow";

//
exports.RECORD_LIVENESS_NOT_CHECK = -1;
exports.RECORD_LIVENESS_NOT_LIVE = 0;
exports.RECORD_LIVENESS_LIVE = 1;
exports.RECORD_LIVENESS_ERROR = -2;

// 文本替换关键字
exports.REPLACE_NAME = "name";
exports.REPLACE_DEPARTMENT = "department";
exports.REPLACE_COMPANY = "company";
exports.REPLACE_ID = "id";
exports.REPLACE_TIME = "time";